home *** CD-ROM | disk | FTP | other *** search
/ Digital Talk 86 / Digital_Talk_86_2009-05-01_Digital_Talk_de_Side_C.d64 / grosse zeiche.db (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  9KB  |  296 lines

  1. 0 :print"[147]tips und technik: grosse-zeichen
  2. 1 :[153]"basic-demo-schau: von dirk breitinger
  3. 10 fori=.to5000:next:goto1000
  4. 11 :
  5. 20 :a$="0:grosse-zeichen":open1,8,15,"s"+a$:close1:savea$,8:return
  6. 21 :
  7. 22 :
  8. 29 :
  9. 50 :rem---lade zeichen
  10. 51 a=asc(mid$(a$,j)):if(aand96)=.then:printchr$(a);:r=fnrv(r):b=-1:return
  11. 52 b=zs+fnas(a)*8+1024*sgn(r):c=peek(1):poke56334,.:poke1,51
  12. 53 fori=.to7:a(i)=peek(b+i):next:poke1,c:poke56334,1:return
  13. 54 :
  14. 59 :
  15. 60 :poke646,1:b=peek(53280):poke198,.:rem--warten
  16. 61 ::a=(a+1)and15:poke53280,a:geta$:on-(a$="")goto61:poke53280,b:return
  17. 62 :poke214,p:poke211,(p-int(p))*101:sys58640:return
  18. 65 :poke53280,a:poke53281,a:return
  19. 97 :
  20. 98 :
  21. 99 :
  22. 400 f=129:e=144:rem--ausschnitt(a$,e,f)
  23. 401 :a$(.)="[146].":a$(1)=" "
  24. 402 :zs=53248+2048
  25. 405 a$(2)="":a$(3)="":p1=pos(.):p2=peek(214)
  26. 410 :r=.:forj=1tolen(a$):poke214,p2:sys58640:gosub412:next:return
  27. 412 :gosub51:ifb<1then:return:
  28. 414 :d$=b$:fori=.to7:b=a(i):iffand2^igoto419
  29. 415 :printtab(p1)a$(sgn(band128)+(eand128)/64)a$(sgn(band64)+(eand64)/32);
  30. 416 :printa$(sgn(band32)+(eand32)/16)a$(sgn(band16)+(eand16)/8);
  31. 417 :printa$(sgn(band8)+(eand8)/4)a$(sgn(band4)+(eand4)/2);
  32. 418 :printa$(sgn(band2)+(eand2))a$((band1)+2*(eand1));:p3=pos(.):print
  33. 419 :next:p1=p3:return
  34. 498 :
  35. 499 :
  36. 500 :rem---zeichen-ausgabe 8x8(a$)
  37. 501 :a$(.)="[146] ":a$(1)=" "
  38. 502 :b$="[157][157][157][157][157][157][157][157]":c$="[145][145][145][145][145][145][145]"
  39. 505 :zs=53248+2048
  40. 510 :r=.:t=ti:forj=1tolen(a$):gosub51:on-(b>-1)gosub514:next:return
  41. 514 d$=b$:fori=.to7:b=a(i):ifi=7then:d$=c$
  42. 515 printa$(sgn(band128))a$(sgn(band64))a$(sgn(band32))a$(sgn(band16));
  43. 516 :printa$(sgn(band8))a$(sgn(band4))a$(sgn(band2))a$(band1)d$;:next:return
  44. 517 :
  45. 518 :
  46. 519 :
  47. 520 :rem---von links nach rechts
  48. 521 ford=7to.step-1:e=2^d:fori=.to7:printa$(sgn(a(i)ande))"[157]";:next:goto527
  49. 522 ford=7to.step-1:e=2^d:printa$(sgn(a(.)ande))"[157]"a$(sgn(a(1)ande))"[157]";
  50. 523 printa$(sgn(a(2)ande))"[157]"a$(sgn(a(3)ande))"[157]"a$(sgn(a(4)ande))"[157]";
  51. 524 printa$(sgn(a(5)ande))"[157]"a$(sgn(a(6)ande))"[157]"a$(sgn(a(7)ande))"[157]";
  52. 527 :print"[145][145][145][145][145][145][145][145]";:next:return
  53. 528 :
  54. 529 :
  55. 540 :rem---mc-ausgabe 4x8(a$)
  56. 541 :a$(.)="[146][155]..":a$(1)="  ":a$(2)="[152]  ":a$(3)="[155]  ":b$=""
  57. 542 :zs=53248+2048
  58. 545 :p1=pos(.):p2=peek(214)
  59. 550 :r=.:forj=1tolen(a$):gosub51:on-(b>-1)gosub554:next:return
  60. 554 poke214,p2:poke211,p1:sys58640:fori=.to7:b=a(i):ifeand2^igoto557
  61. 555 printa$((band192)/64)a$((band48)/16)a$((band12)/4)a$(band3);
  62. 556 :p3=pos(.):print"[157]";:poke211,p1:printb$;
  63. 557 :next:p1=p3:return
  64. 558 :
  65. 559 :
  66. 560 :a$(.)="[152][146][166][166][157][157][166][166][145]":a$(2)="[159][169][153][223][157][157][146][223][159][169][145]"
  67. 561 :a$(1)="[129][207][208][157][157][204][186][145]":a$(3)="[150][175][186][157][157][186][175][145]":b$=""
  68. 562 :e=.:zs=53248:goto545
  69. 569 :
  70. 599 :
  71. 600 :rem---zeichen-ausgabe 4x8(a$)
  72. 602 :a$(.)="[146] ":a$(1)="[161]":a$(2)="[146][161]":a$(3)=" ":b$="[157][157][157][157]":c$="[145][145][145][145][145][145][145]":
  73. 605 :zs=53248+2048*1:r=.
  74. 610 :forj=1tolen(a$):gosub51:on-(b>-1)gosub614:next:return
  75. 614 :d$=b$:fori=.to7:b=a(i):ifi=7then:d$=c$
  76. 615 :printa$((band192)/64)a$((band48)/16)a$((band12)/4)a$(band3)d$;:next:return
  77. 618 :
  78. 619 :
  79. 695 :
  80. 696 :
  81. 697 :
  82. 698 :
  83. 699 :
  84. 700 :rem---spielfeld ausgeben
  85. 702 :a$=   "cccccccccccccccccccc"
  86. 703 :a$=a$+"c  c              5c"
  87. 704 :a$=a$+"c11ccc ccccccccccc c"
  88. 705 :a$=a$+"c111 c c         c c"
  89. 706 :a$=a$+"c 11 c c ccccccc c c"
  90. 707 :a$=a$+"c1     b       c c c"
  91. 708 :a$=a$+"cccccccc ccccc c c c"
  92. 709 :a$=a$+"c111  c   11 c c c c"
  93. 710 :a$=a$+"c 11c cccc111c b   c"
  94. 711 :a$=a$+"cbccc  c1ccccc ccc c"
  95. 712 :a$=a$+"c                c1c"
  96. 713 :a$=a$+"cccccccccccccccccccc"
  97. 719 :
  98. 720 :a$(.)="[152][146][166][166][157][157][166][166][145]":a$(1)="[159][169][153][223][157][157][146][223][159][169][145]"
  99. 722 :a$(2)="[129][207][208][157][157][204][186][145]":a$(3)="[150][175][186][157][157][186][175][145]":b$=""
  100. 723 :a$(4)="[158]..[157][157]><[145]":a$(5)="[215][215][157][157][188][190][145]"
  101. 730 :print"[156][147][142]";:i=1
  102. 731 :fori=itoi+19:printa$(asc(mid$(a$,i)+" ")and15);:next:printb$;
  103. 732 :on-(i<239)goto731:i=.
  104. 735 :a$=" feld-spiel ":printa$a$a$""
  105. 736 :p=2.12:p1=p:gosub62:printa$(4);:m=20:p2=2.36
  106. 739 :deffnc(a)=peek(peek(209)+peek(210)*256+pos(.)+a):poke649,1
  107. 740 :geta$:a=asc(a$+" ")
  108. 741 p=p1:gosub62:b=fnc((a=29)*-2+2*(a=157)-80*(a=17)+80*(a=145)):c=.
  109. 745 ifb=239orb=174then:a$="":c=4:rem:wand,nix
  110. 750 :printa$(c)"[157][157]"a$a$a$(4)"[157][157]";:p1=peek(214)+pos(.)/100
  111. 751 remifnot(b=102)then:print""b:
  112. 752 :m=m+(b=233):ifm>.goto769
  113. 760 p=10.10:gosub62:a$="[153][197]nde":gosub800:goto60:ende
  114. 769 i=(i+1)*-(i<3):ifi>.goto740
  115. 770 :p=p2:gosub62:c=102:ondgoto773,774,775
  116. 771 :
  117. 772 :iffnc(2)=cthen:a$="":b=.:d=0:goto777
  118. 773 :iffnc(80)=cthen:a$="":b=.:d=0:goto777
  119. 774 :iffnc(-2)=cthen:a$="[157]":b=.:d=2:goto777
  120. 775 :iffnc(-80)=cthen:a$="[145]":b=.:d=2:goto777
  121. 776 :d=1+(e=5):b=5:e=b:a$=""
  122. 777 :printa$(b)"[157][157]"a$a$a$(5)"[157][157]";:p2=peek(214)+pos(.)/100:goto740
  123. 780 :a$(6)="[146][209][209][157][157][209] [145]":a$(7)="[159][213][201][157][157][154][203][202][145]":b$=""
  124. 781 :a$(8)="[129][146][223] [157][157][146] [223][145]":a$(9)="[154][213][201][157][157][203][202][145]":b$=""
  125. 782 :
  126. 783 :a$(4)="[158]..[157][157]><[145][157][157]":end
  127. 790 :
  128. 797 :
  129. 798 :
  130. 799 :
  131. 800 :rem----zeichen-ausgabe(4x4)
  132. 801 :b$="[157][157][157][157]":c$="[145][145][145]":zs=55296
  133. 802 :a$(.)="[146] ":a$(2)="[146][190]":a$(1)="[146][188]":a$(3)="[162]":a$(8)="[146][187]":a$(10)="[146][161]"
  134. 803 :a$(9)="[191]":a$(11)="[172]":a$(4)="[146][172]":a$(6)="[146][191]":a$(5)="[161]":a$(7)="[187]"
  135. 804 :a$(12)="[146][162]":a$(14)="[188]":a$(13)="[190]":a$(15)=" ":ifa$=""then:return
  136. 810 :r=.:forj=1tolen(a$):gosub51:on-(b>-1)gosub812:next:return:
  137. 812 :d$=b$:fori=.to7step2:a=a(i):b=a(i+1):ifi=6then:d$=c$
  138. 813 :printa$((a/64and3)+(b/16and12))a$((aand48)/16+(band48)/4);
  139. 814 :printa$((band12)+(a/4and3))a$((aand3)+(band3)*4)d$;:next:return
  140. 815 :
  141. 816 :
  142. 817 :
  143. 818 :
  144. 819 :
  145. 820 :rem--- zeichen ausgabe(4x4)
  146. 824 :gosub51:d$=b$:fori=.to7step2:a=a(i):b=a(i+1):ifi=6then:d$=c$
  147. 825 :printa$(sgn(aand128)*2+sgn(aand64)+sgn(band128)*8+sgn(band64)*4);
  148. 826 :printa$(sgn(aand32)*2+sgn(aand16)+sgn(band32)*8+sgn(band16)*4);
  149. 827 :printa$(sgn(aand8)*2+sgn(aand4)+sgn(band8)*8+sgn(band4)*4);
  150. 828 :printa$(sgn(aand2)*2+sgn(aand1)+(band2)*4+(band1)*4)d$;:next
  151. 829 :return
  152. 830 :b$="[157][157][157]":c$="[145][145][145]":zs=55296
  153. 831 :r=.:forj=1tolen(a$):gosub51:on-(b>-1)gosub832:next:return:
  154. 832 :d$=b$:fori=.to7step2:a=a(i):b=a(i+1):ifi=6then:d$=c$
  155. 833 :printa$((aand96)/32+(band96)/8)a$((aand24)/8+(band24)/2);
  156. 834 :printa$((aand6)/2+(band6)*2)d$;:next:return
  157. 835 :
  158. 839 :
  159. 840 :b$="[157][157]":c$="[145][145][145]":zs=55296
  160. 841 :r=.:forj=1tolen(a$):gosub51:on-(b>-1)gosub842:next:return:
  161. 842 :d$=b$:fori=.to7step2:a=a(i):b=a(i+1):ifi=6then:d$=c$
  162. 843 printa$((aand48)/16+(band48)/4)a$((aand4)/2+(aand1)+(band4)*2+(band1)*4)d$;
  163. 844 :next:return
  164. 845 :
  165. 849 :
  166. 850 :a$="":gosub800:rem---schnell
  167. 851 :fora=32to128:gosub52:gosub852:print""a$:z$(a)=a$:next:return
  168. 852 a$="":d$=b$:fori=.to7step2:c=a(i):b=a(i+1):ifi=6then:d$=c$
  169. 853 :a$=a$+a$((c/64and3)+(b/16and12))+a$((cand48)/16+(band48)/4)
  170. 854 :a$=a$+a$((band12)+(c/4and3))+a$((cand3)+(band3)*4)+d$:next:return
  171. 855 :print"[147]":inputa$
  172. 856 :fori=1tolen(a$):j=asc(mid$(a$,i,1)):printz$(j+96*(j>128));:next:
  173. 857 :print"":return
  174. 858 :end
  175. 859 :
  176. 900 :rem----laufschrift4x4(a$)
  177. 901 :b$="[145][145][145][145]":c$="[145][145][145]":zs=55296
  178. 902 :a$(.)="[146] ":a$(2)="[146][190]":a$(1)="[146][188]":a$(3)="[162]":a$(8)="[146][187]":a$(10)="[146][161]"
  179. 903 :a$(9)="[191]":a$(11)="[172]":a$(4)="[146][172]":a$(6)="[146][191]":a$(5)="[161]":a$(7)="[187]"
  180. 904 :a$(12)="[146][162]":a$(14)="[188]":a$(13)="[190]":a$(15)=" ":ifa$=""then:return
  181. 905 :deffna(i)=(a(i)andb)/d+(a(i+1)andb)*c
  182. 910 :r=.:forj=1tolen(a$):gosub51:on-(a<5orb>-1)gosub912:next:return
  183. 912 :ifa<5then:fora=-ato-1:printd$;:i=80:gosub916:next:goto916
  184. 913 :d=64:b$="":fori=.to3:b=d*3:c=4/d
  185. 914 :b$=b$+d$+a$(fna(.))+"[157]"+a$(fna(2))+"[157]"+a$(fna(4))+"[157]"+a$(fna(6))+"[157][145][145][145]"
  186. 915 :d=d/4:next:printb$;:i=(jand7)*15
  187. 916 :fori=-i-fnr(i)to.:next:return
  188. 919 :
  189. 920 :d$="[146][145][146] [157] [157] [157] [145][145][145]"+chr$(20)+"[157]"
  190. 921 ::print"[147]";:poke214,p:print"[145]";:poke213,199:print"[157]";:return
  191. 929 :
  192. 930 :rem----demo
  193. 932 :p=2:gosub920
  194. 933 :a$="[200]allo, wie geht es so ???, wenn man fragen darf.     ":gosub900
  195. 934 :p=10:gosub921:a$="[146][215][153]ar das [211][146][153]piel[146] gut ???  ":gosub900
  196. 935 a$="[215][146]ie fandet ihr dies [194]asic[146] [159][214]ersuchsprogramm[146] ???  ":gosub900
  197. 936 :p=18:gosub921:a$="[206][146]a dann geht es zurueck zum [193][146]nfang.  ":gosub900
  198. 937 :poke214,24:printr$"";:return
  199. 993 :
  200. 994 :
  201. 995 :
  202. 996 :
  203. 997 :
  204. 998 :
  205. 999 :
  206. 1000 :rem==============================
  207. 1001 :rem hauptprogramm
  208. 1002 :rem==============================
  209. 1003 :gosub1030:goto1100
  210. 1030 :deffn as(a)=a+64*((a>63)+(a>191))-(a>95anda<128)*32+(a=255)*33
  211. 1031 :deffn rv(r)=(ror-(a=18))*-(a<>146)
  212. 1032 :deffn r(a)=int(rnd(0)*a+1)
  213. 1040 :dima$(16),z$(128):r$=chr$(13):zs=55296
  214. 1090 :return
  215. 1098 :
  216. 1099 :
  217. 1100 :a=4:gosub65
  218. 1102 :print"[156][147][142]";
  219. 1199 :
  220. 1200 :rem---8x8
  221. 1201 :a$(.)="[166]":a$(1)="[158][164]":b$="[157][146] [157][157][157][157][157][157][157][157]":c$="[157][146] [145][145][145][145][145][145][145]":f=.:e=1
  222. 1202 :a$="[200]allo":gosub505:
  223. 1209 :
  224. 1210 :rem---4x8
  225. 1211 :poke214,10:print:print"";:a$="[195][159]64[146][198][159][193][206][211]":gosub602
  226. 1219 :
  227. 1230 :rem---4x4
  228. 1231 :b$="[157] [157][157][157][157]":c$="[157] [157][145][145][145]"
  229. 1232 :poke214,20:print:a$="[154][196]rueck[212]aste":gosub802
  230. 1233 :gosub60:ifa$="_"goto1200
  231. 1234 :print"[153]":a$="[200]allo an alle":gosub830:gosub60:
  232. 1235 :print"":a$="[200]allo an alle andern":gosub840:gosub60:
  233. 1239 :
  234. 1299 :
  235. 1300 :rem---16x8
  236. 1301 :a$(.)="[154][166][166]":a$(1)="[158][175][186]":b$="[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]":c$=b$
  237. 1302 :print"[156][147]"tab(12);:a$="[200]allo":gosub505
  238. 1320 :rem---16x16
  239. 1321 :a$(.)="[152]::[157][157]::[145]":a$(1)="[155]  [157][157]  [145]":b$="[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]":c$=b$
  240. 1322 :print"[156]"tab(12);:a$="[200]allo":gosub505
  241. 1330 :
  242. 1400 :rem---24x16
  243. 1401 :a$(.)="[150][166][166][166][157][157][157][166][166][166][145]":
  244. 1402 :a$(1)="[158]   [157][157][157][164][164][164][145]":
  245. 1405 :b$="":c$=b$
  246. 1406 :printr$r$""tab(8);:a$="[200]allo":gosub505
  247. 1409 :
  248. 1410 :rem---24x24
  249. 1411 :a$(.)="[150][166][166][166][157][157][157][166][166][166][157][157][157][166][166][166][145][145]":
  250. 1412 :a$(1)="[158]   [157][157][157]   [157][157][157][164][164][164][145][145]":
  251. 1415 :b$="":c$=b$
  252. 1416 :printr$r$""tab(8);:a$="[200]allo":gosub505
  253. 1430 :
  254. 1500 :rem---32x24
  255. 1501 :a$(.)="[154][186][186][186][186][157][157][157][157][186][186][186][186][157][157][157][157][186][186][186][186][145][145]":
  256. 1502 :a$(1)="[153][166][168][168][166][157][157][157][157][166][166][166][166][157][157][157][157][166][166][166][166][145][145]":
  257. 1505 :b$="":c$=b$
  258. 1506 :printr$r$""tab(4);:a$="[200]allo":gosub505
  259. 1509 :
  260. 1510 :rem---32x32
  261. 1511 :a$(.)="[154][166][166][166][166][157][157][157][157][166][166][166][166][157][157][157][157][166][166][166][166][157][157][157][157][166][166][166][166][145][145][145]":
  262. 1512 :a$(1)="[159]    [157][157][157][157]    [157][157][157][157]    [157][157][157][157]    [145][145][145]":
  263. 1515 :b$="":c$=b$
  264. 1516 :printr$r$""tab(4);:a$="[200]allo":gosub505:gosub60
  265. 1519 :
  266. 1530 :gosub1600:goto1700
  267. 1598 :
  268. 1599 :
  269. 1600 :rem---runterzaehler
  270. 1601 :a$(.)="[151][166][166][166][157][157][157][166][166][166][157][157][157][166][166][166][145][145]":
  271. 1602 :a$(1)="   [157][157][157]   [157][157][157]   [145][145]":
  272. 1603 :b$="":c$=""
  273. 1604 :e$="987654321[207]"
  274. 1605 print"[147]";:fore=1tolen(e$):a$=mid$(e$,e,1):print""tab(8)
  275. 1606 poke53265,11:gosub505:poke53281,.:poke53280,.:poke53265,27
  276. 1607 fori=.to1100:next:next:goto60
  277. 1608 :
  278. 1609 :
  279. 1700 :poke53280,11:poke53281,4:gosub700,spiel
  280. 1799 :
  281. 1800 :print"[147]";:gosub930,laufschrift:gosub60
  282. 1900 print"[147][158]":gosub850:rem--schnellschrift(4x4)
  283. 1910 :a$="[200]allo":gosub856
  284. 1911 :a$="wie geht's":gosub856:print""
  285. 1912 :a$="[197]uch ???":gosub856
  286. 1915 :gosub60
  287. 1920 :print"[147][159]"
  288. 1921 :a$="[206]un geht's":gosub856
  289. 1922 :a$="wirklich":gosub856:print""
  290. 1923 :a$="zum [193]nfang":gosub856
  291. 1925 :gosub60
  292. 1930 :
  293. 1940 :
  294. 1950 :
  295. 3000 :run
  296.